home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / sys / Stropts.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  4.0 KB  |  191 lines

  1. /* Copyright (C) 1986-1994 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __SYS_STROPTS_H
  7. #define __SYS_STROPTS_H 1
  8.  
  9. #include <sys/types.h>    
  10.  
  11. #define SNDZERO         0x001
  12. #define SNDPIPE         0x002
  13.  
  14. #define RNORM           0x000
  15. #define RMSGD           0x001
  16. #define RMSGN           0x002
  17. #define RMODEMASK       0x003
  18. #define RPROTDAT        0x004
  19. #define RPROTDIS        0x008
  20. #define RPROTNORM    0x010
  21. #define RPROTMASK       0x01c
  22.  
  23. #define FLUSHR          0x01
  24. #define FLUSHW          0x02
  25. #define FLUSHRW         0x03
  26. #define FLUSHBAND       0x04
  27.  
  28. #define S_INPUT         0x0001
  29. #define S_HIPRI         0x0002
  30. #define S_OUTPUT        0x0004
  31. #define S_MSG           0x0008
  32. #define S_ERROR         0x0010
  33. #define S_HANGUP        0x0020
  34. #define S_RDNORM        0x0040
  35. #define S_WRNORM    S_OUTPUT
  36. #define S_RDBAND        0x0080
  37. #define S_WRBAND        0x0100
  38. #define S_BANDURG       0x0200
  39.  
  40. #define RS_HIPRI        0x01
  41. #define    DONT_BLOCK      0x02        
  42.  
  43. #define MSG_HIPRI       0x01
  44. #define MSG_ANY         0x02
  45. #define MSG_BAND        0x04
  46.  
  47. #define MORECTL         1
  48. #define MOREDATA        2
  49.  
  50. #define MUXID_ALL    (-1)
  51.  
  52. #define ANYMARK        0x01
  53. #define LASTMARK    0x02
  54.  
  55. /*  Stream Ioctl defines */
  56. #define    STR        ('S'<<8)
  57. /* (STR|000) in use */
  58. #define I_NREAD        (STR|01)
  59. #define I_PUSH        (STR|02)
  60. #define I_POP        (STR|03)
  61. #define I_LOOK        (STR|04)
  62. #define I_FLUSH        (STR|05)
  63. #define I_SRDOPT    (STR|06)
  64. #define I_GRDOPT    (STR|07)
  65. #define I_STR        (STR|010)
  66. #define I_SETSIG    (STR|011)
  67. #define I_GETSIG    (STR|012)
  68. #define I_FIND        (STR|013)
  69. #define I_LINK        (STR|014)
  70. #define I_UNLINK    (STR|015)
  71. /* (STR|016) in use */
  72. #define I_PEEK        (STR|017)
  73. #define I_FDINSERT    (STR|020)
  74. #define I_SENDFD    (STR|021)
  75. #define I_RECVFD        (STR|022)
  76.  
  77. #define I_SWROPT    (STR|023)
  78. #define I_GWROPT    (STR|024)
  79. #define I_LIST        (STR|025)
  80. #define I_PLINK        (STR|026)
  81. #define I_PUNLINK    (STR|027)
  82. #define I_FLUSHBAND    (STR|034)
  83. #define I_CKBAND    (STR|035)
  84. #define I_GETBAND    (STR|036)
  85. #define I_ATMARK    (STR|037)
  86. #define I_SETCLTIME    (STR|040)
  87. #define I_GETCLTIME    (STR|041)
  88. #define I_CANPUT    (STR|042)
  89. #define    I_S_RECVFD    (STR|043)
  90.  
  91. /* Same ioctl as O_MODESWITCH */
  92. #define    X_STR            ('S'<<8)    /* SCO XENIX Streams ioctl's */
  93. #define    X_I_BASE        (X_STR|0200)
  94. #define    X_I_NREAD        (X_STR|0201)
  95. #define    X_I_PUSH        (X_STR|0202)
  96. #define    X_I_POP            (X_STR|0203)
  97. #define    X_I_LOOK        (X_STR|0204)
  98. #define    X_I_FLUSH        (X_STR|0205)
  99. #define    X_I_SRDOPT        (X_STR|0206)
  100. #define    X_I_GRDOPT        (X_STR|0207)
  101. #define    X_I_STR            (X_STR|0210)
  102. #define    X_I_SETSIG        (X_STR|0211)
  103. #define    X_I_GETSIG        (X_STR|0212)
  104. #define    X_I_FIND        (X_STR|0213)
  105. #define    X_I_LINK        (X_STR|0214)
  106. #define    X_I_UNLINK        (X_STR|0215)
  107. #define    X_I_PEEK        (X_STR|0217)
  108. #define    X_I_FDINSERT        (X_STR|0220)
  109. #define    X_I_SENDFD        (X_STR|0221)
  110. #define    X_I_RECVFD        (X_STR|0222)
  111.  
  112. struct strioctl
  113.         {
  114.         int     ic_cmd;
  115.         int     ic_timout;
  116.         int     ic_len;
  117.         char    *ic_dp;
  118.         };
  119.  
  120. #define INFTIM        -1
  121.  
  122. struct strbuf
  123.         {
  124.         int     maxlen;
  125.         int     len;
  126.         char    *buf;
  127.         };
  128.  
  129. struct strpeek
  130.         {
  131.     struct strbuf ctlbuf;
  132.     struct strbuf databuf;
  133.     long          flags;
  134.         };
  135.  
  136. struct strfdinsert
  137.         {
  138.     struct strbuf ctlbuf;
  139.     struct strbuf databuf;
  140.     long          flags;
  141.     int          fildes;
  142.     int          offset;
  143.         };
  144.  
  145. struct strrecvfd
  146.         {
  147.     int fd;
  148.     o_uid_t uid;
  149.     o_gid_t gid;
  150.     char fill[8];
  151.         };
  152.  
  153.  
  154. #ifndef FMNAMESZ
  155. #define FMNAMESZ    8
  156. #endif
  157.  
  158. struct str_mlist
  159.         {
  160.     char l_name[FMNAMESZ+1];
  161.         };
  162.  
  163. struct str_list
  164.         {
  165.     int sl_nmods;
  166.     struct str_mlist *sl_modlist;
  167.         };
  168.  
  169. struct bandinfo
  170.         {
  171.     unsigned char    bi_pri;
  172.     int        bi_flag;
  173.         };
  174.  
  175. #if __cplusplus
  176. extern "C"
  177. {
  178. #endif
  179.  
  180. #if !__STDC__
  181. int __cdecl getmsg(int, struct strbuf *, struct strbuf *, int *);
  182. int __cdecl putmsg(int, const struct strbuf *, const struct strbuf *, int);
  183. #endif
  184.  
  185. #if __cplusplus
  186. }
  187. #endif
  188.  
  189. #endif
  190.  
  191.